<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="${initParam.root }/css/board/main_boardWriteUpdate.css">
<script type="text/javascript">   
$(function(){
$("#writeQna").click(function(){
	if($("#b_title").val()==""){
		alert("제목을 입력하세요");
		$("#b_title").focus();
		return;
		}else if($("#b_content").val()==""){
			alert("본문을 입력하세요");
			$("#b_content").focus();
			return;
		}
		$("#qnaForm").submit();
	});//click
});//ready
</script>

<div id="전체틀">
	<header id="title">
		<font><b>글쓰기</b></font>
	</header>
	<div id="write">
		<form action="${initParam.root}/board.do" method="post" id="qnaForm" name="write_form" enctype="multipart/form-data">
		<input type="hidden" name="command" value=writeQna>
			<table>
				<tr>
					<td>제목</td><td><input type="text" name="b_title" id="b_title" maxlength="100" size="30"></td>
				</tr>
				<tr> 
					<td>파일</td><td><input type="file" name="uploadFile"></td>
				</tr>
				<tr>
					<td colspan="2"><textarea cols="35" rows="10" name="b_content" id="b_content"></textarea></td>
				</tr> 
				<tr>
					<td colspan="2"  ><img src="${initParam.root }/img/paging/confirm.gif" id="writeQna"></td>  
				</tr>
			</table>
		</form>
	</div>
</div>
